import type { LoginData, Userinfo } from '@/types/login'
import { request } from '@/utils/http'

export const login = (data: LoginData) => {
  return request<Userinfo>({
    url: '/login/wxMin',
    method: 'POST',
    data,
  })
}

export const mockLogin = (phoneNumber: string) => {
  return request<Userinfo>({
    url: '/login/wxMin/simple',
    method: 'POST',
    data: {
      phoneNumber,
    },
  })
}
